<%@page import="com.drerp.BI.LogicaBI"%>
<%@page import="com.drerp.BI.Clinica.LogicaClinica"%>
<%@page import="java.util.List"%>  

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../js/jscharts.js"></script>

<title>Tempo de Espera e de Atendimento</title>
</head>

<body>
<div id="graph">Loading...</div>
<% LogicaBI logicaBI = new LogicaBI(); %>
<script type="text/javascript">
	
	var myData = new Array(['Segunda', <%= logicaBI.getTempoDeEspera(0)%>,<%= logicaBI.getTempoDeAtendimento(0)%>], 
			['Terça', <%= logicaBI.getTempoDeEspera(1)%>, <%= logicaBI.getTempoDeAtendimento(1)%>], 
			['Quarta', <%= logicaBI.getTempoDeEspera(2)%>, <%= logicaBI.getTempoDeAtendimento(2)%>], 
			['Quinta', <%= logicaBI.getTempoDeEspera(3)%>, <%= logicaBI.getTempoDeAtendimento(3)%>], 
			['Sexta', <%= logicaBI.getTempoDeEspera(4)%>, <%= logicaBI.getTempoDeAtendimento(4)%>]);
	var myChart = new JSChart('graph', 'bar');
	myChart.setDataArray(myData);
	myChart.setTitle('Tempo de Espera e de Atendimento');
	myChart.setTitleColor('#8E8E8E');
	myChart.setAxisNameX('');
	myChart.setAxisNameY('');
	myChart.setAxisNameFontSize(16);
	myChart.setAxisNameColor('#999');
	myChart.setAxisValuesAngle(30);
	myChart.setAxisValuesColor('#777');
	myChart.setAxisColor('#B5B5B5');
	myChart.setAxisWidth(1);
	myChart.setBarValuesColor('#2F6D99');
	myChart.setAxisPaddingTop(60);
	myChart.setAxisPaddingBottom(60);
	myChart.setAxisPaddingLeft(45);
	myChart.setTitleFontSize(11);
	myChart.setBarColor('#2D6B96', 1);
	myChart.setBarColor('#9CCEF0', 2);
	myChart.setBarBorderWidth(0);
	myChart.setBarSpacingRatio(50);
	myChart.setBarOpacity(0.9);
	myChart.setFlagRadius(6);
	myChart.setLegendShow(true);
	myChart.setLegendPosition('right top');
	myChart.setLegendForBar(1, 'Espera');
	myChart.setLegendForBar(2, 'Atendimento');
	myChart.setSize(616, 321);
	myChart.setGridColor('#C6C6C6');
	myChart.draw();
</script>

<table border="1">
<tr>
<th>Dia</th>
<th>Espera</th>
<th>Consulta</th>
</tr>
<tr>
<td>Segunda</td>
<td><%= logicaBI.getTempoDeEspera(0)%></td>
<td><%= logicaBI.getTempoDeAtendimento(0)%></td>
</tr>
<tr>
<td>Terça</td>
<td><%= logicaBI.getTempoDeEspera(1)%></td>
<td><%= logicaBI.getTempoDeAtendimento(1)%></td>
</tr>
<tr>
<td>Quarta</td>
<td><%= logicaBI.getTempoDeEspera(2)%></td>
<td><%= logicaBI.getTempoDeAtendimento(2)%></td>
</tr>
<tr>
<td>Quinta</td>
<td><%= logicaBI.getTempoDeEspera(3)%></td>
<td><%= logicaBI.getTempoDeAtendimento(3)%></td>
</tr>
<tr>
<td>Sexta</td>
<td><%= logicaBI.getTempoDeEspera(4)%></td>
<td><%= logicaBI.getTempoDeAtendimento(4)%></td>
</tr>
</table>

</body>
</html>
